#include "StdAfx.h"
#include "ToolRun.h"

ToolRun::ToolRun(void)
{
}

ToolRun::~ToolRun(void)
{
}
bool ToolRun::Init()
{
	m_MainStage.Init();
	m_MainCancelButton.Init();

	m_LoginScene.Init();
	m_LoginButton.Init();
	m_CreateAccountButton.Init();
	
	m_CreateAccountScene.Init();
	m_RegisterButton.Init();
	m_CancelCreateButton.Init();

	m_MainStage.AddChildWindow(&m_LoginScene);
	m_MainStage.AddChildWindow(&m_CreateAccountScene);
	m_MainStage.AddChildWindow(&m_MainCancelButton);


	m_LoginScene.AddChildWindow(&m_LoginButton);
	m_LoginScene.AddChildWindow(&m_CreateAccountButton);

	m_CreateAccountScene.AddChildWindow(&m_RegisterButton);
	m_CreateAccountScene.AddChildWindow(&m_CancelCreateButton);

	m_MainStage.SetBoardSize(1152,864);

	//////////////////////////////////////////////////////////////////////////

	m_uvSetTestButton = &m_MainCancelButton;

	return true;
}
bool ToolRun::Frame()
{

	m_MainStage.Frame();
/*
	m_MainCancelButton.Frame();

	m_LoginScene.Frame();
	m_LoginButton.Frame();
	m_CreateAccountButton.Frame();

	m_CreateAccountScene.Frame();
	m_RegisterButton.Frame();
	m_CancelCreateButton.Frame();*/


	return true;
}
bool ToolRun::Render()
{
	m_MainStage.Render();
/*
	m_MainCancelButton.Render();

	m_LoginScene.Render();
	m_LoginButton.Render();
	m_CreateAccountButton.Render();

	m_CreateAccountScene.Render();
	m_RegisterButton.Render();
	m_CancelCreateButton.Render();*/


	return true;
}
bool ToolRun::Release()
{
	m_MainStage.Release();
	m_MainCancelButton.Release();

	m_LoginScene.Release();
	m_LoginButton.Release();
	m_CreateAccountButton.Release();

	m_CreateAccountScene.Release();
	m_RegisterButton.Release();
	m_CancelCreateButton.Release();
	return true;
}

void ToolRun::Run()
{
	DCore::CoreRun();
}
